<?php

class FP_View_Helper_Link extends Zend_View_Helper_Url {

    public function link($pRouteName, array $pParameters=array()){
	return parent::url($pParameters, $pRouteName);

/*
	$routes = array();

	include(BASE_DIR . 'config/routes.php');

	if (array_key_exists($pRouteName, $routes)){

	    $route = $routes[$pRouteName];

	    $url = $route['route'];

	    $route_parts = explode('/', $route['route']);

	    foreach ($route_parts as $i => $rpart){

		if (preg_match('/^:(.*)/', $rpart, $matches)){
		    $var_name = $matches[1];
		    if (array_key_exists($var_name, $pParameters)){

			$url = preg_replace("/:$var_name/", $pParameters[$var_name], $url);

		    }
		}
	    }

	    return $url;
	} else
	    throw new Silk_Exception('Route does not exist - ' . $pRouteName);*/

    }


}

?>